package com.ruijiang.controller.user_service;


import com.ruijiang.controller.ApiPrefix;
import com.ruijiang.entity.Role;
import com.ruijiang.service.UserService.RoleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(ApiPrefix.USER_SERVICE+"/role")
@Slf4j
public class RoleController {

    @Autowired
    private RoleService roleService;

    /**
     * 获取角色列表
     * @return
     */
    @GetMapping
    public List<Role> getRoleList(){
        List<Role> list = roleService.getRoleList();
        return  list;
    }



}
